1. Field of the Invention
The present invention relates to a peripheral control system, and more particularly, to a peripheral control system having a peripheral driver program and an application program communicating with each other through DDE (dynamic data exchange) protocol.
2. Description of the Prior Art
Please refer to FIG. 1 and FIG. 2. FIG. 1 is a perspective view of a prior art peripheral control system 10. FIG. 2 is a function block diagram of the computer 12 shown in FIG. 1. The peripheral control system 10 is used for controlling a peripheral device 14, such as scanner or digital camera. The system 10 comprises a computer 12 connected to the peripheral device 14. The computer 12 comprises a memory 20 for storing programs and data, and a processor 22 for executing programs stored in the memory 20. The memory 20 comprises a peripheral driver module 24, a peripheral management module (TWAIN) 26, and an application program 28. The peripheral driver module 24 is stored in a subroutine file format, such as the DLL file in Windows 95 from Microsoft Corporation, for driving the peripheral device 14. The peripheral management module 26 is also stored in a subroutine file format which uses subroutine calls to communicate with the peripheral driver module 24. The application program 28 is stored in an executable file format, such as the EXE file, which uses subroutine calls to communicate with the peripheral management module 26.
The peripheral management module (TWAIN) 26 is a standard subroutine library developed by many image peripheral vendors and application program vendors for managing data communications between application programs provided by application program vendors and peripheral driver modules provided by image peripheral vendors. The image peripherals include scanners, digital cameras, image database, etc.. And the application programs include image processing software, fax processing software, word processors, etc..
Please refer to FIG. 3. FIG. 3 is a diagrammatic view of the control flow between the application program 28 and the peripheral driver module 24 shown in FIG. 2. The application program 28 uses subroutine calls to communicate with the peripheral management module 26, and then the peripheral management module 26 uses subroutine calls to communicate with the peripheral driver module 24. The peripheral driver module 24 controls the peripheral device 14 according to instructions generated by the application program 28 and passes data between the application program 28 and the peripheral device 14.
One disadvantage of the prior art peripheral control system 10 is that both the peripheral management module 26 and the peripheral driver module 24 are in a subroutine file format instead of in executable file format. Only the application program 28 is in executable file format and can be executed independently. The peripheral management module 26 and the peripheral driver module 24 are initiated by the application program 28 before making subroutine calls and thus share the same allocated resources such as memory space. In such situation the peripheral driver module 24 must be executed together with the application program 28 in a computer. If any of them gets failed, both of them will stop execution. Besides, since the peripheral driver module 24 must be passively initiated by the application program 28, it is impossible to add any automatically executable functions into the peripheral driver module 24 such as the automatic detecting and scanning function provided by many scanners nowadays. Such functions must be provided by using other software and/or hardware because of the passive initiation restriction of the peripheral driver module 24.